function(b) {
  switch (scrollDis = "top" === e.scrollFrom ? e.scrollDistance : a(c).height() - a(b).height() - e.scrollDistance, e.animation) {
    case "fade":
      a(a(b).scrollTop() > scrollDis ? f.fadeIn(e.animationInSpeed) : f.fadeOut(e.animationOutSpeed));
      break;
    case "slide":
      a(a(b).scrollTop() > scrollDis ? f.slideDown(e.animationInSpeed) : f.slideUp(e.animationOutSpeed));
      break;
    default:
      a(a(b).scrollTop() > scrollDis ? f.show(0) : f.hide(0))
  }
}